import React from "react";

import styled from "styled-components";
export const ContractCodeTagWrap = styled.div`
  display: flex;
  align-items: center;
  /* justify-content: center; */
`;
const ContractCodeTagStyle = styled.span`
  display: inline-block;
  /* border-radius: 8px; */

  background: #ffeeef;
  border: 1px solid #f93a4a;
  width: 52px;
  min-height: 18px;
  font-weight: 400;
  color: #ff4848;
  line-height: 12px;
  font-size: 10px;
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
`;
export const ContractCodeTag = ({ record }: { record?: any }) => {
  if (record.contrChange == 1 || record.cancelStatus == 1) {
    if (record.contrChange == 1) {
      return <ContractCodeTagStyle>变更中</ContractCodeTagStyle>;
    }

    if (record.cancelStatus == 1) {
      return <ContractCodeTagStyle>作废中</ContractCodeTagStyle>;
    }
  }

  return null;
};
